import request from '@/utils/request'

// 查询物资盘点单列表(分页)
export function GetStocktakingList(data) {
	return request({
		url: 'pda/wm/stocktaking/list',
		headers: {
			isToken: true
		},
		method: 'post',
		data: data
	})
}

// 物资盘点单新增
export function AddStocktaking(data) {
	return request({
		url: 'pda/wm/stocktaking/add',
		headers: {
			isToken: true
		},
		method: 'post',
		data: data
	})
}

//修改物资盘点单
export function UpdateStocktaking(data) {
	return request({
		url: 'pda/wm/stocktaking/update',
		headers: {
			isToken: true
		},
		method: 'put',
		data: data
	})
}

// 获取库存盘点记录详细信息
export function GetStocktakingInfo(takingId) {
	return request({
		url: 'pda/wm/stocktaking/' + takingId,
		headers: {
			isToken: true
		},
		method: 'get'
	})
}

//上传盘点单结果
export function UpLoadResult(data) {
	return request({
		url: 'pda/wm/stocktaking/result',
		headers: {
			isToken: true
		},
		method: 'put',
		data: data
	})
}

//删除库存盘点信息
export function DelStocktaking(takingId) {
	return request({
		url: 'pda/wm/stocktaking/'+takingId,
		headers: {
			isToken: true
		},
		method: 'delete'
	})
}
 
// 执行盘点结果
export function UpLoadResult(takingId) {
	return request({
		url: 'pda/wm/stocktaking/'+takingId,
		headers: {
			isToken: true
		},
		method: 'put'
	})
}